angular.module('app', ['ngRoute'])
.controller('homeController', function ($scope, $route) { $scope.$route = $route;})
.controller('solutionController', function ($scope, $route) { $scope.$route = $route;})
.controller('newsController', function ($scope, $route) { $scope.$route = $route;})
.controller('aboutController', function ($scope, $route) { $scope.$route = $route;})
.controller('caseController', function ($scope, $route) { $scope.$route = $route;})
.controller('caseDetailController', function ($scope, $route) { $scope.$route = $route;})
.controller('buildingController', function ($scope, $route) { $scope.$route = $route;})
.controller('supportController', function ($scope, $route) { $scope.$route = $route;})
.controller('contactController', function ($scope, $route) { $scope.$route = $route;})
.config(function ($routeProvider) {
    $routeProvider.
    when('/home', {
        templateUrl: 'home/home.html',
        controller: 'homeController'
    }).
    when('/solution', {
        templateUrl: 'solution/solution.html',
        controller: 'solutionController'
    }).
    when('/news', {
        templateUrl: 'news/news.html',
        controller: 'newsController'
    }).
    when('/news/news_detail', {
        templateUrl: 'news/news_detail.html',
        controller: 'newsDetailController'
    }).
    
    when('/about', {
        templateUrl: 'about/about.html',
        controller: 'aboutController'
    }).
    when('/case', {
        templateUrl: 'case/case.html',
        controller: 'caseController'
    }).
    when('/case/case_detail', {
        templateUrl: 'case/case_detail.html',
        controller: 'caseDetailController'
    }).
    when('/building', {
        templateUrl: 'building/building.html',
        controller: 'buildingController'
    }).
    when('/support', {
        templateUrl: 'support/support.html',
        controller: 'supportController'
    }).
    when('/contact', {
        templateUrl: 'contact/contact.html',
        controller: 'contactController'
    }).
   
    otherwise({
        redirectTo: '/home'
    });
});